export function setPie(echarts){
    var myChart = echarts.init(document.getElementById('main1'));
    myChart.setOption({

        tooltip: {
            trigger: 'item',
        },
        legend: {
            top:'center',
            left: 'right',
            orient:'vertical',
            align:'left',
            textStyle:{
              color:'#fff',
            },
        },
        series: [
            {
                name: 'Access From',
                type: 'pie',
                radius: ['40%', '70%'],
                avoidLabelOverlap: false,
                itemStyle: {
                    borderRadius: 1,
                    borderColor: '#fff',
                    borderWidth: 1
                },
                label: {
                    show: false,
                    position: 'center'
                },
                emphasis: {
                    label: {
                        show: true,
                        fontSize: 20,
                        fontWeight: 'bold'
                    }
                },
                color:['#318AE3','#D9230A','#D86704'],
                data: [
                    { value: 960, name: '新闻' },
                    { value: 24, name: '微博' },
                    { value: 16, name: '贴吧' },
                ]
            }
        ]
    });

}